/**
 * Created by Administrator on 2017/4/12.
 */
jQuery(document).ready(function() {

    App.init();

    Login.init();

});

function loginIn(form){
    App.blockUI($('.content'));

    $.post(
        'http://localhost:3000/loginIn',
        $(form).serialize(),
        function(data){

            App.unblockUI($('.content'));
            if (data.status === 'fail') {
                App.unblockUI($('.content'));
                $('.alert-danger').children('span').html(data.msg);
                $('.alert-error', $('.login-form')).hide();
                $('.alert-danger', $('.login-form')).show();
            }

            if(data.status === 'success'){
                App.unblockUI($('.content'));
                window.location.href ='http://localhost:3000/loginIn';
            }
    });

}


